
#ifndef _MYMAINWINDOW_
#define _MYMAINWINDOW_

#include <QtGui/QtGui>
#include "ui_interface.h"

/// Implements the main window by inheriting from Ui::MainWindow.
class MyMainWindow : public QMainWindow, private Ui::MainWindow 
{
   Q_OBJECT
   
public:
   /// Constructor
   MyMainWindow (QMainWindow *parent = 0);
   
   /// process the input parameters
   void open(int argc, char * argv[]);
   
   /// try to load a model
   void open_model(QString fileName);
   
   /// try to load a skeleton file
   void open_skeleton(QString filename);
   
   /// try to load a poses file
   void open_poses(QString filename);
   
   /// try to load an skinning file
   void open_skinning(QString filename);
   
private slots:
   
   /// Increments the slider value and calls the animateValueSlider() function
   void addValueSlider();
   
   /// Animates the current slider value
   void animateValueSlider();
   
   void on_actionSave_poses_as_triggered();
   void on_actionSave_Current_Model_triggered();
   
   /// Automatically bound to the actionSelect triggered event by the designer mechanism.
   /// Enters select mode.
   void on_actionSelect_triggered();
   
   /// Automatically bound to the actionRestriction triggered event
   /// by the designer mechanism. Enters restriction insertion mode.
   void on_actionRestriction_triggered();
   
   /// Automatically bound to the actionKey triggered event
   /// by the designer mechanism. Enters keypoint insertion mode.
   void on_actionKey_triggered();
   
   /// Automatically bound to the actionAnimate triggered event
   /// by the designer mechanism. Enters animation mode.
   void on_actionAnimate_triggered();
   
   /// Groups selected objects.
   void on_actionGroup_triggered();
   
   /// Ungroups selected objects.
   void on_actionUngroup_triggered();
   
   void on_actionResetAll_triggered();
   
   void on_actionViewModel_triggered();
   void on_actionViewSkeleton_triggered();
   void on_actionViewConstraints_triggered();
   void on_actionViewKeyPoints_triggered();
   void on_actionViewFloor_triggered();
   void on_actionViewInfo_triggered();
   void on_actionViewShadow_triggered();
   void on_actionViewCurrentKeyPoint_triggered();
   
   void on_actionRenderPoints_triggered();
   void on_actionRenderWireframe_triggered();
   void on_actionRenderFlat_triggered();
   void on_actionRenderFlatLines_triggered();
   void on_actionRenderHiddenLines_triggered();
   void on_actionRenderSmooth_triggered();
   void on_actionRenderTransparency_triggered();
   void on_actionLightOnOff_triggered();
   void on_actionProjection_triggered();
   
   //~ void on_actionNewPlay_triggered();
   
   void on_actionAxisAngleRotation_triggered();
   void on_actionUnitQuaternionRotation_triggered();
   void on_actionLinearBlendingRotation_triggered();
   
   void on_actionInsertClones_triggered();
   
   void on_bPlay_clicked();
   void on_bStop_clicked();
   void on_bPause_clicked();
   void on_bRecord_clicked();
   void on_bCaptureDialog_clicked();
private:
   QActionGroup         *meshrenderGroup;
   QActionGroup         *rotationCompGroup;
   QString              filenamemodel;
   
   /// Animation data
   QTimer               *timer;     // animation timer
   QTimer               *rectimer;  // record timer
};

#endif
